/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package percussiongenerator.commands;

import java.util.ArrayList;
import java.util.Collection;
import org.jfonia.model.PerformanceNode;
import org.jfonia.model.PerformanceSequence;

/**
 *
 * @author jannes
 */
public class SplitMultipleTones implements ICommand{

    ArrayList<SplitTone> commands;

    public SplitMultipleTones(Collection<PerformanceNode> perNodes, PerformanceSequence perSeq){
        commands = new ArrayList<SplitTone>();
        for(PerformanceNode perNode: perNodes){
            commands.add(new SplitTone(perNode, perSeq));
        }
    }

    public void execute() {
        for(ICommand command: commands){
            command.execute();
        }
    }

    public void undo() {
        for(ICommand command: commands){
            command.undo();
        }
    }


}
